﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ProjDetail.aspx.cs" Inherits="HelfenHelfen.Web.Forms.Site.ProjDetail" %>
<asp:Content ID="content" ContentPlaceHolderID="MainContent" runat="server">
<asp:ObjectDataSource ID="odsDemand" runat="server" SelectMethod="GetDetailView"
                      TypeName="HelfenHelfen.Logic.Factories.DemandLogicAdapter`1[[HelfenHelfen.Logic.DemandLogic, HelfenHelfen.Logic]]">
   <SelectParameters>
      <asp:SessionParameter Name="id" SessionField="DemandID" DbType="Guid" />
   </SelectParameters>                      
</asp:ObjectDataSource>

   <asp:FormView ID="FormView1" runat="server" DataSourceID="odsDemand" RenderOuterTable="false">
      <ItemTemplate>
         <h1><%# Eval("Demand.Title") %></h1>
         <p> <%# Eval("Demand.Description") %></p>
         <div class="photo_big">
            <asp:Image ID="Image1" runat="server"  ImageUrl='<%# "~/ShowImageByDemand.ashx?id=" + Eval("Demand.DemandGUID") %>' />
            <div class="description">
               <%# Eval("Image.ImageDescription") %>
            </div>
         </div>
         <div class="info bottomspace">
            <div class="left">
               <div class="box">
                  <h2>Nähere Infos</h2>
                  <p><%# Eval("Demand.Description") %></p>
                  <div class="table_container">
                     <table>
                        <asp:Repeater ID="abc" runat="server" DataSource='<%# Eval("DemandDetail") %>'>
                           <HeaderTemplate>
                              <tr>
                                 <th>#</th>
                                 <th>Qualifikation</th>
                                 <th>Punkte</th>
                                 <th>Zeitraum</th>
                              </tr>
                           </HeaderTemplate>
                           <ItemTemplate>
                              <tr>
                                 <td><%# Eval("NoOfHelpersNeeded") %></td>
                                 <td><%# Eval("QualificationsNeeded") %></td>
                                 <td><%# Eval("BonusPointsPerPerson") %></td>
                                 <td><%# DataBinder.Eval(Container.DataItem, "StartDateTime", "{0:d}")%>&nbsp;-&nbsp;<%# DataBinder.Eval(Container.DataItem, "EndDateTime", "{0:d}")%></td>
                              </tr>
                           </ItemTemplate>
                        </asp:Repeater>
                     </table>
                  </div>
                  <p><a href="javascript:javascript:history.go(-1)"><< Zurück</a></p>
               </div> <!-- .box -->
            </div> <!-- .left -->

            <div class="right">
               <div class="box">
                  <h2>Organisation</h2>
                  <p><%# Eval("Organisation.Name") %></p>
                  <h2>Email</h2>
                  <p><%# Eval("UserDetail.EMail" )%></p>
                  <h2>Telefon</h2>
                  <p><%# Eval("UserDetail.PhoneNo") %></p>
               </div> <!-- .box -->
            </div> <!-- .right -->
         </div> <!-- .info -->
      </ItemTemplate>
   </asp:FormView>
</asp:Content>
